package com.runjian.rundo.iot.agent.iec104.module;

import com.runjian.rundo.iot.agent.common.entity.AgentDeviceDTO;

import com.runjian.rundo.iot.agent.iec104.consts.DeviceType;
import lombok.Getter;
import lombok.Setter;

/**
 * 104设备信息
 *
 * @author CaoQingHua
 */
@Getter
@Setter
public class Iec104Device extends AgentDeviceDTO {

    /**
     * 对应地址
     */
    Short address;

    /**
     * 协议Id
     */
    private String protocolId;


    @Override
    public String getExternalId() {
        if (super.getExternalId() == null) {
            super.setExternalId(String.valueOf(this.getAddress()));
        }
        return super.getExternalId();
    }
}
